package com.sample.snl.frontend.LexicalAnalysis;

public class ErrorState extends State {
    Automaton automaton;

    public ErrorState(Automaton a) {
        this.automaton = a;
    }


    @Override
    void HandleCharacter(int ch) {
        //LexicalAnalyser.LOG.warn("[Error] Unrecognized token. near " + LexicalAnalyser.line + ":" + LexicalAnalyser.column);
        LexicalAnalyser.errors.add("[Error] Unrecognized token. near " + LexicalAnalyser.line + ":" + LexicalAnalyser.column);
        automaton.token = new Token();
        automaton.gotToken = true;
    }
}
